﻿using System;

public partial class ffl_user_pickmyteam : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Alserve.Ffl.Security.IsLoggedIn(Page) || Alserve.Ffl.FflCommon.InRunning())
            Response.Redirect("//ffl//anonymous//default.aspx");

        PlayerPickerWUC.ControlRefreshed += new EventHandler(PlayerPickerWUC_ControlRefreshed);
        ShowMyTeamWUC.ControlRefreshed += new EventHandler(ShowMyTeamWUC_ControlRefreshed);
    }

    private void PlayerPickerWUC_ControlRefreshed(object sender, EventArgs e)
    {
        ShowMyTeamWUC.UpdatePositionCounts();
        ShowMyTeamWUC.UpdateShowMyTeamDataSource();
    }

    private void ShowMyTeamWUC_ControlRefreshed(object sender, EventArgs e)
    {
        PlayerPickerWUC.UpdatePositionCounts();
        PlayerPickerWUC.UpdateClubDataSource();
        PlayerPickerWUC.UpdatePlayerClubDataSource();
    }

}
